# ===CODE===

schema_content = '''
{
    "type": "object",
    "properties": {
        "pre_script": {"type": "string"},
        "post_script": {"type": "string"},
        "build_options": { "$ref": "#/$defs/build_options" },
        "projects": {
            "type": "object",
            "patternProperties": {
                "[a-z,A-Z,_][a-z,A-Z,0-9,_]*": {
                    "type": "object",
                    "properties": {
                        "type": {"type": "string", "enum": ["lib", "dll", "exe", "lib_dll", "mexe"]},
                        "dep": {"type": "array", "items": {"type": "string"}},
                        "build_script": {"type": "string"},
                        "pre_script": {"type": "string"},
                        "post_script": {"type": "string"},
                        "mgc_script": {"type": "string"},
                        "proj_dir": {"type": "string"},
                        "disable": {"type": "boolean"},
                        "disable_list": {"type": "array", "items": {"type": "string"}},
                        "extral_inc_dirs": {"type": "array", "items": {"type": "string"}},
                        "extral_libs": {"type": "array", "items": {"type": "string"}},
                        "build_options": { "$ref": "#/$defs/build_options" }
                    },
                    "required": ["type"]
                }
            }
        }
    },
    "required": ["projects"],
    "$defs": {
        "build_options": {
            "type": "object",
            "properties": {
                "c_compiler": {"type": "string"},
                "cpp_compiler": {"type": "string"},
                "linker": {"type": "string"},
                "link_option": {"type": "string"},
                "lib_builder": {"type": "string"},
                "dll_builder": {"type": "string"},
                "c_std": {"type": "string"},
                "cpp_std": {"type": "string"},
                "c_warning": {"type": "string"},
                "cpp_warning": {"type": "string"},
                "optimize": {"type": "string"},
                "debug": {"type": "boolean"},
                "shell_script": {"type": "string"},
                "define": {
                    "type": "object",
                    "patternProperties": {
                        "[a-z,A-Z,_][a-z,A-Z,0-9,_]*": {
                            "type": "string"
                        }
                    }
                }
            }
        }
    }
}
'''
